package pl.perseus.action;

import java.util.HashMap;
import java.util.Map;

import lombok.Getter;
import lombok.Setter;

import org.springframework.beans.factory.annotation.Autowired;

import pl.perseus.model.User;
import pl.perseus.service.user.IUserService;

public class GetUserAction extends BaseAction {

	@Autowired
	IUserService userService;
	
	@Getter
	@Setter
	User user;
	
	@Getter
	@Setter
	Map<String, Object> result;
	
	@Override
	public String execute() {
		result = new HashMap<String, Object>();
		
		result.put("user", userService.getById(user.getId()));
		
		return SUCCESS;
	}

}
